package com.css.zfzx.sjcj.modules.hddcB6_GeochemicalProjectTable.repository;

import com.css.zfzx.sjcj.modules.hddcB6_GeochemicalProjectTable.repository.entity.HddcB6GeochemicalprojecttableEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @author zhangcong
 * @date 2020-11-27
 */
public interface HddcB6GeochemicalprojecttableRepository extends JpaRepository<HddcB6GeochemicalprojecttableEntity, String> {
    @Query(nativeQuery = true, value = "select * from hddc_b6_geochemicalprojecttable where is_valid =1 and project_name in :projectIds")
    List<HddcB6GeochemicalprojecttableEntity> queryByProjectId(List<String> projectIds);

    @Query(nativeQuery = true, value = "select * from hddc_b6_geochemicalprojecttable where is_valid =1 and task_name in :taskIds")
    List<HddcB6GeochemicalprojecttableEntity> queryByTaskId(List<String> taskIds);
}
